import { pickedModelData, PickFrom } from '@amcax/base';

export type SimpleSelectedModels = Map<string, pickedModelData>;

export interface ComplexSelectedModels {
  selectedModels: SimpleSelectedModels;
  from: PickFrom;
}

export type SelectedModels = SimpleSelectedModels | ComplexSelectedModels;

export const isSimpleSelectedModels = (
  selectedModels: SelectedModels,
): selectedModels is SimpleSelectedModels => selectedModels instanceof Map;
